
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        let st='胡歌1,彭于晏'
        // 将字符串装换为数组
       let s= st.split(",");
       let str=s.map(i=>{
           return `<span>正品:${i}</span> <br>`
           //转换回来字符串
       }).join("")

       document.body.innerHTML=str

    //    简写
    let sts='胡歌,彭于晏,2'
   document.body.innerHTML = sts.split(",").map(itme=> `<span>正品:${itme}</span> <br>` ).join("")


// 转换字符串
let n=10
console.log(String(n));
console.log(n.toString());
    </script>
</body>
</html>